package com.fenqing.comics.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fenqing.comics.dao.IAuthorDao;
import com.fenqing.comics.dao.mapper.AuthorMapper;
import com.fenqing.comics.entity.AuthorEntity;
import org.springframework.stereotype.Repository;

/**
 * @author fenqing
 */
@Repository
public class AuthorDaoImpl extends ServiceImpl<AuthorMapper, AuthorEntity> implements IAuthorDao {
    @Override
    public boolean existsByName(String name) {
        return this.lambdaQuery().eq(AuthorEntity::getName, name).exists();
    }
}
